Three-dimensional (3D) modeling of physical objects has many applications in the area of computer graphics. For example, computer-based 3D models of objects may be employed to generate animation, to insert digital images into film or photographic images, to design objects, and for many other purposes. 3D models of physical objects are often generated using digital images of the physical objects, such as images captured by a digital camera. To generate an accurate 3D model of an object depicted in a digital image, a developer may wish to remove environmental effects that may obscure the characteristics of the modeled object. For example, lighting and shading effects in an image can obscure the shape of objects in the image. To create an accurate three-dimensional (3D) model of an object depicted in an image, a developer may wish to remove the lighting effects from the image.
To remove such environmental effects, digital images are often separated into intrinsic images which contain only isolated, inherent properties of the image. For example, a digital image can be separated into intrinsic images such as reflectance and shading images. A reflectance image extracted from an original image is isolated from the lighting and shading effects of the original image and represents the material properties (such as color and texture) of objects depicted in the image. A reflectance image, with lighting and shading effects removed, may provide an accurate representation of an object's shape. A shading image extracted from an original image is a grayscale representation of the illumination of an image.
Intrinsic images may be used in computer vision and graphics tasks. Segmentation and stereo matching algorithms may be more effective when using an illumination invariant reflectance image (e.g., a reflectance image with no intrinsic shading characteristics). As an example, a texture map for a 3D model of an image may be generated more accurately when lighting effects have been removed from the image. As another example, shape-from-shading algorithms may be more effective using only a shading image (e.g., an image absent of reflectance, or albedo information) to infer object geometry. As a further example, image relighting efforts, such as removing flash lighting effects to soften an image taken with flash photography, may require an image containing only intrinsic properties such as reflectance, normal, and depth. In such a case, the intrinsic properties of an image due to lighting effects may need to be removed before new lighting effects can be added.
Conventional methods assume that reflectance and shading components of an image do not change at the same location on an image. Such conventional methods analyze an image to locate image derivatives (e.g., changes in image characteristics) across the image and then use a binary classifier to classify each image derivative as either a reflectance or a shading derivative. For example, large image derivatives may be classified as reflectance derivatives and small image derivatives may be classified as shading derivatives. However, such a binary classification of image properties does not accurately model real world images. Each point on an image is more likely to have a combination of both reflectance and shading characteristics, rather than be restricted to one characteristic or the other. Furthermore, choosing an appropriate threshold for the binary classifier is difficult and a poorly selected threshold will result in further inaccuracies in a 3D model of an object.
A binary classifier used in conventional methods may be trained to produce accurate classifications of reflectance and shading characteristics across an image, but the training method is time-consuming and difficult to perform. For example, the training method requires matched lighting directions across training images and testing images, which is extremely limiting and difficult to obtain. In addition, a very large amount of training data must be collected, which is time-consuming. Furthermore, since the trained binary classifier requires such a large amount of training data, the computation time required for classifying the reflectance and shading characteristics of an image is long and, as a result, computationally expensive.